@rspress/core 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/0~execa.js +32 -41
- package/dist/0~rslib-runtime.js +38 -0
- package/dist/0~tinypool.js +828 -0
- package/dist/{8311.js → 1688.js} +1 -7
- package/dist/{7397.js → 2240.js} +4 -2
- package/dist/{1361.js → 3294.js} +1 -1
- package/dist/{1965.js → 3425.js} +0 -1
- package/dist/740.js +2470 -0
- package/dist/8006.js +77 -0
- package/dist/8857.js +4827 -0
- package/dist/8857.js.LICENSE.txt +41 -0
- package/dist/cli/index.js +7 -3
- package/dist/config/loadConfigFile.js +1 -1
- package/dist/eject-theme/components/CodeBlock/index.scss +4 -0
- package/dist/eject-theme/components/CodeBlock/index.tsx +14 -6
- package/dist/eject-theme/components/CodeButtonGroup/CopyCodeButton.scss +1 -1
- package/dist/eject-theme/components/CodeButtonGroup/index.scss +1 -1
- package/dist/eject-theme/components/DocContent/doc.scss +2 -0
- package/dist/eject-theme/components/FallbackHeading/index.tsx +1 -1
- package/dist/eject-theme/components/Link/useLinkNavigate.ts +4 -1
- package/dist/eject-theme/components/Llms/LlmsCopyButton.scss +3 -3
- package/dist/eject-theme/components/Search/SearchPanel.tsx +1 -1
- package/dist/eject-theme/components/Steps/index.scss +32 -13
- package/dist/node/PluginDriver.js +2 -2
- package/dist/node/auto-nav-sidebar/index.js +2 -2
- package/dist/node/auto-nav-sidebar/locales.js +1 -1
- package/dist/node/auto-nav-sidebar/normalize.js +9 -5
- package/dist/node/auto-nav-sidebar/utils.js +8 -2
- package/dist/node/auto-nav-sidebar/walk.js +2 -8
- package/dist/node/constants.js +1 -1
- package/dist/node/eject.js +14 -8
- package/dist/node/initRsbuild.js +6 -6
- package/dist/node/logger/hint.js +9 -6
- package/dist/node/mdx/options.js +15 -4
- package/dist/node/mdx/processor.js +1 -1
- package/dist/node/mdx/rehypePlugins/codeMeta.js +1 -1
- package/dist/node/mdx/rehypePlugins/headerAnchor.js +3 -2
- package/dist/node/mdx/rehypePlugins/shiki.d.ts +4 -1
- package/dist/node/mdx/rehypePlugins/shiki.js +5 -3
- package/dist/node/mdx/rehypePlugins/transformers/add-fold.d.ts +7 -1
- package/dist/node/mdx/rehypePlugins/transformers/add-fold.js +23 -6
- package/dist/node/mdx/rehypePlugins/transformers/index.js +6 -6
- package/dist/node/mdx/remarkPlugins/builtin.js +1 -1
- package/dist/node/mdx/remarkPlugins/containerSyntax.js +7 -1
- package/dist/node/mdx/remarkPlugins/fileCodeBlock.js +6 -2
- package/dist/node/mdx/remarkPlugins/image.d.ts +7 -2
- package/dist/node/mdx/remarkPlugins/image.js +51 -2
- package/dist/node/mdx/remarkPlugins/link.js +7 -3
- package/dist/node/mdx/remarkPlugins/toc.js +1 -1
- package/dist/node/route/RoutePage.js +1 -1
- package/dist/node/route/RouteService.js +1 -1
- package/dist/node/route/extractPageData.js +77 -27
- package/dist/node/route/normalizeRoutePath.js +1 -1
- package/dist/node/runtimeModule/i18n.js +10 -6
- package/dist/node/runtimeModule/pageData/createPageData.js +1 -1
- package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +1 -1
- package/dist/node/runtimeModule/searchHooks.js +1 -1
- package/dist/node/runtimeModule/siteData/createSiteData.js +1 -1
- package/dist/node/runtimeModule/siteData/normalizeThemeConfig.js +1 -1
- package/dist/node/runtimeModule/siteData/rsbuildPlugin.js +1 -1
- package/dist/node/serve.js +1 -1
- package/dist/node/ssg/renderPage.js +8 -4
- package/dist/node/ssg/renderPageWorker.js +1 -1
- package/dist/node/ssg/renderPages.js +9 -5
- package/dist/node/ssg/rsbuildPluginSSG.js +20 -7
- package/dist/node/ssg/ssgEnv.js +1 -1
- package/dist/node/ssg-md/llms/emitLlmsTxt.js +1 -1
- package/dist/node/ssg-md/llms/llmsTxt.js +3 -2
- package/dist/node/ssg-md/remarkSplitMdx.js +1 -1
- package/dist/node/ssg-md/renderPage.js +8 -4
- package/dist/node/ssg-md/renderPages.js +7 -3
- package/dist/node/ssg-md/rsbuildPluginSSGMD.js +1 -1
- package/dist/node/utils/checkLanguageParity.js +1 -1
- package/dist/node/utils/createHash.js +1 -1
- package/dist/node/utils/error.js +5 -2
- package/dist/node/utils/flattenMdxContent.js +3 -2
- package/dist/node/utils/fs.js +1 -1
- package/dist/node/utils/getPageKey.js +1 -1
- package/dist/node/utils/normalizePath.js +3 -2
- package/dist/node/utils/reactAlias.js +7 -3
- package/dist/runtime/App.js +4 -1
- package/dist/runtime/hooks/useWindowSize.test.js +10 -10
- package/dist/runtime/index.d.ts +2 -1
- package/dist/runtime/index.js +2 -1
- package/dist/runtime/initPageData.d.ts +3 -0
- package/dist/runtime/initPageData.js +37 -2
- package/dist/runtime/ssrClientEntry.js +4 -2
- package/dist/theme/assets/success.js +1 -1
- package/dist/theme/assets/wrapped.js +1 -1
- package/dist/theme/components/CodeBlock/index.css +4 -0
- package/dist/theme/components/CodeBlock/index.d.ts +0 -3
- package/dist/theme/components/CodeBlock/index.js +8 -3
- package/dist/theme/components/CodeButtonGroup/CopyCodeButton.css +3 -3
- package/dist/theme/components/CodeButtonGroup/index.css +3 -3
- package/dist/theme/components/DocContent/doc.css +1 -0
- package/dist/theme/components/FallbackHeading/index.js +1 -1
- package/dist/theme/components/Link/useLinkNavigate.js +3 -2
- package/dist/theme/components/Llms/LlmsCopyButton.css +9 -9
- package/dist/theme/components/Llms/LlmsViewOptions.css +2 -2
- package/dist/theme/components/Search/SearchPanel.js +1 -1
- package/dist/theme/components/Steps/index.css +23 -12
- package/dist/theme/logic/useThemeState.js +1 -1
- package/package.json +14 -17
- package/dist/4454.js +0 -8
- package/dist/4524.js +0 -71
- package/dist/8885.js +0 -4
- package/dist/rslib-runtime.js +0 -18
package/dist/0~execa.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import * as __rspack_external_child_process from "child_process";
|
|
2
|
-
import * as __rspack_external_fs from "fs";
|
|
3
|
-
import * as __rspack_external_path from "path";
|
|
4
|
-
import * as __rspack_external_stream from "stream";
|
|
5
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
6
1
|
import { Buffer } from "node:buffer";
|
|
7
2
|
import node_path from "node:path";
|
|
8
3
|
import node_child_process, { ChildProcess } from "node:child_process";
|
|
9
4
|
import node_process from "node:process";
|
|
10
|
-
import
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
11
6
|
import node_os, { constants } from "node:os";
|
|
12
7
|
import { createReadStream, createWriteStream, readFileSync } from "node:fs";
|
|
13
8
|
import { setTimeout as promises_setTimeout } from "node:timers/promises";
|
|
14
9
|
import { debuglog } from "node:util";
|
|
10
|
+
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
11
|
+
import "./740.js";
|
|
15
12
|
__webpack_require__.add({
|
|
16
13
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
17
14
|
const cp = __webpack_require__("child_process");
|
|
@@ -73,7 +70,7 @@ __webpack_require__.add({
|
|
|
73
70
|
};
|
|
74
71
|
},
|
|
75
72
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
76
|
-
const path = __webpack_require__("path");
|
|
73
|
+
const path = __webpack_require__("path?aeb1");
|
|
77
74
|
const resolveCommand = __webpack_require__("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js");
|
|
78
75
|
const escape = __webpack_require__("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js");
|
|
79
76
|
const readShebang = __webpack_require__("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js");
|
|
@@ -153,7 +150,7 @@ __webpack_require__.add({
|
|
|
153
150
|
module.exports.argument = escapeArgument;
|
|
154
151
|
},
|
|
155
152
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
156
|
-
const fs = __webpack_require__("fs");
|
|
153
|
+
const fs = __webpack_require__("fs?8b28");
|
|
157
154
|
const shebangCommand = __webpack_require__("../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js");
|
|
158
155
|
function readShebang(command) {
|
|
159
156
|
const size = 150;
|
|
@@ -169,7 +166,7 @@ __webpack_require__.add({
|
|
|
169
166
|
module.exports = readShebang;
|
|
170
167
|
},
|
|
171
168
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
172
|
-
const path = __webpack_require__("path");
|
|
169
|
+
const path = __webpack_require__("path?aeb1");
|
|
173
170
|
const which = __webpack_require__("../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js");
|
|
174
171
|
const getPathKey = __webpack_require__("../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js");
|
|
175
172
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -200,7 +197,7 @@ __webpack_require__.add({
|
|
|
200
197
|
module.exports = resolveCommand;
|
|
201
198
|
},
|
|
202
199
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
203
|
-
__webpack_require__("fs");
|
|
200
|
+
__webpack_require__("fs?8b28");
|
|
204
201
|
var core;
|
|
205
202
|
core = 'win32' === process.platform || global.TESTING_WINDOWS ? __webpack_require__("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js") : __webpack_require__("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js");
|
|
206
203
|
module.exports = isexe;
|
|
@@ -241,7 +238,7 @@ __webpack_require__.add({
|
|
|
241
238
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
242
239
|
module.exports = isexe;
|
|
243
240
|
isexe.sync = sync;
|
|
244
|
-
var fs = __webpack_require__("fs");
|
|
241
|
+
var fs = __webpack_require__("fs?8b28");
|
|
245
242
|
function isexe(path, options, cb) {
|
|
246
243
|
fs.stat(path, function(er, stat) {
|
|
247
244
|
cb(er, er ? false : checkStat(stat, options));
|
|
@@ -270,7 +267,7 @@ __webpack_require__.add({
|
|
|
270
267
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
271
268
|
module.exports = isexe;
|
|
272
269
|
isexe.sync = sync;
|
|
273
|
-
var fs = __webpack_require__("fs");
|
|
270
|
+
var fs = __webpack_require__("fs?8b28");
|
|
274
271
|
function checkPathExt(path, options) {
|
|
275
272
|
var pathext = void 0 !== options.pathExt ? options.pathExt : process.env.PATHEXT;
|
|
276
273
|
if (!pathext) return true;
|
|
@@ -358,7 +355,7 @@ __webpack_require__.add({
|
|
|
358
355
|
},
|
|
359
356
|
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
360
357
|
const isWindows = 'win32' === process.platform || 'cygwin' === process.env.OSTYPE || 'msys' === process.env.OSTYPE;
|
|
361
|
-
const path = __webpack_require__("path");
|
|
358
|
+
const path = __webpack_require__("path?aeb1");
|
|
362
359
|
const COLON = isWindows ? ';' : ':';
|
|
363
360
|
const isexe = __webpack_require__("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js");
|
|
364
361
|
const getNotFoundError = (cmd)=>Object.assign(new Error(`not found: ${cmd}`), {
|
|
@@ -442,18 +439,6 @@ __webpack_require__.add({
|
|
|
442
439
|
};
|
|
443
440
|
module.exports = which;
|
|
444
441
|
which.sync = whichSync;
|
|
445
|
-
},
|
|
446
|
-
child_process (module) {
|
|
447
|
-
module.exports = __rspack_external_child_process;
|
|
448
|
-
},
|
|
449
|
-
fs (module) {
|
|
450
|
-
module.exports = __rspack_external_fs;
|
|
451
|
-
},
|
|
452
|
-
path (module) {
|
|
453
|
-
module.exports = __rspack_external_path;
|
|
454
|
-
},
|
|
455
|
-
stream (module) {
|
|
456
|
-
module.exports = __rspack_external_stream;
|
|
457
442
|
}
|
|
458
443
|
});
|
|
459
444
|
function stripFinalNewline(input) {
|
|
@@ -468,34 +453,40 @@ function pathKey(options = {}) {
|
|
|
468
453
|
if ('win32' !== platform) return 'PATH';
|
|
469
454
|
return Object.keys(env).reverse().find((key)=>'PATH' === key.toUpperCase()) || 'Path';
|
|
470
455
|
}
|
|
471
|
-
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
const cwdString = cwd instanceof URL ? node_url.fileURLToPath(cwd) : cwd;
|
|
475
|
-
let cwdPath = node_path.resolve(cwdString);
|
|
456
|
+
const npmRunPath = ({ cwd = node_process.cwd(), path: pathOption = node_process.env[pathKey()], preferLocal = true, execPath = node_process.execPath, addExecPath = true } = {})=>{
|
|
457
|
+
const cwdString = cwd instanceof URL ? fileURLToPath(cwd) : cwd;
|
|
458
|
+
const cwdPath = node_path.resolve(cwdString);
|
|
476
459
|
const result = [];
|
|
460
|
+
if (preferLocal) applyPreferLocal(result, cwdPath);
|
|
461
|
+
if (addExecPath) applyExecPath(result, execPath, cwdPath);
|
|
462
|
+
return [
|
|
463
|
+
...result,
|
|
464
|
+
pathOption
|
|
465
|
+
].join(node_path.delimiter);
|
|
466
|
+
};
|
|
467
|
+
const applyPreferLocal = (result, cwdPath)=>{
|
|
468
|
+
let previous;
|
|
477
469
|
while(previous !== cwdPath){
|
|
478
470
|
result.push(node_path.join(cwdPath, 'node_modules/.bin'));
|
|
479
471
|
previous = cwdPath;
|
|
480
472
|
cwdPath = node_path.resolve(cwdPath, '..');
|
|
481
473
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
}
|
|
488
|
-
function npmRunPathEnv({ env = node_process.env, ...options } = {}) {
|
|
474
|
+
};
|
|
475
|
+
const applyExecPath = (result, execPath, cwdPath)=>{
|
|
476
|
+
const execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;
|
|
477
|
+
result.push(node_path.resolve(cwdPath, execPathString, '..'));
|
|
478
|
+
};
|
|
479
|
+
const npmRunPathEnv = ({ env = node_process.env, ...options } = {})=>{
|
|
489
480
|
env = {
|
|
490
481
|
...env
|
|
491
482
|
};
|
|
492
|
-
const
|
|
483
|
+
const pathName = pathKey({
|
|
493
484
|
env
|
|
494
485
|
});
|
|
495
|
-
options.path = env[
|
|
496
|
-
env[
|
|
486
|
+
options.path = env[pathName];
|
|
487
|
+
env[pathName] = npmRunPath(options);
|
|
497
488
|
return env;
|
|
498
|
-
}
|
|
489
|
+
};
|
|
499
490
|
const copyProperty = (to, from, property, ignoreNonConfigurable)=>{
|
|
500
491
|
if ('length' === property || 'prototype' === property) return;
|
|
501
492
|
if ('arguments' === property || 'caller' === property) return;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __webpack_modules__ = {};
|
|
2
|
+
var __webpack_module_cache__ = {};
|
|
3
|
+
function __webpack_require__(moduleId) {
|
|
4
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
5
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
6
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
7
|
+
exports: {}
|
|
8
|
+
};
|
|
9
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
10
|
+
return module.exports;
|
|
11
|
+
}
|
|
12
|
+
__webpack_require__.m = __webpack_modules__;
|
|
13
|
+
(()=>{
|
|
14
|
+
__webpack_require__.n = (module)=>{
|
|
15
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
16
|
+
__webpack_require__.d(getter, {
|
|
17
|
+
a: getter
|
|
18
|
+
});
|
|
19
|
+
return getter;
|
|
20
|
+
};
|
|
21
|
+
})();
|
|
22
|
+
(()=>{
|
|
23
|
+
__webpack_require__.d = (exports, definition)=>{
|
|
24
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: definition[key]
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
(()=>{
|
|
31
|
+
__webpack_require__.add = function(modules) {
|
|
32
|
+
Object.assign(__webpack_require__.m, modules);
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
(()=>{
|
|
36
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
37
|
+
})();
|
|
38
|
+
export { __webpack_require__ };
|